<nz-card>
  <h1>基础信息</h1>
  <nz-row class="baseRow">
    <nz-col nzSpan="8">
      <span class="label">活动id</span>
      <span class="info">{{detail?.promotionInfo?.id}}</span>
    </nz-col>
    <nz-col nzSpan="8">
      <span class="label">状态</span>
      <span class="info">{{rechargeService.STATUS[detail?.promotionInfo?.status]}}</span>
    </nz-col>
    <nz-col nzSpan="8">
      <span class="label">活动名称<i nz-icon nzType="question-circle" nzTheme="outline" nz-tooltip="仅内部可见"></i></span>
      <span class="info">{{detail?.promotionInfo?.name}}</span>
    </nz-col>
  </nz-row>
  <nz-row class="baseRow">
    <nz-col nzSpan="8">
      <span class="label">前端标题<i nz-icon nzType="question-circle" nzTheme="outline" nz-tooltip="外部可见"></i></span>
      <span class="info">{{detail?.promotionInfo?.showCopy}}</span>
    </nz-col>
    <nz-col nzSpan="8">
      <span class="label">活动类型</span>
      <span class="info">{{rechargeService.TYPE[detail?.promotionInfo?.type]}}</span>
    </nz-col>
    <nz-col nzSpan="8">
      <span class="label">参与人限制</span>
      <span class="info">{{rechargeService.USERTYPE[detail?.promotionInfo?.userType]}}</span>
    </nz-col>
  </nz-row>
  <nz-row class="baseRow">
    <nz-col nzSpan="8">
      <span class="label">创建时间</span>
      <span class="info">{{detail?.promotionInfo?.createTime}}</span>
    </nz-col>
    <nz-col nzSpan="8">
      <span class="label">有效时间</span>
      <span class="info">{{detail?.promotionInfo?.beginTime}}-{{detail?.promotionInfo?.endTime}}</span>
    </nz-col>
    <nz-col nzSpan="8">
      <span class="label">备注</span>
      <span class="info">{{detail?.promotionInfo?.remark}}</span>
    </nz-col>
  </nz-row>

  <h1>优惠信息</h1>
  <nz-table #table [nzShowPagination]="false" nzBordered [nzData]="detail.promotionInfoLog"
            [nzPageSize]="9999" [nzScroll]="{ y: '440px' }">
    <thead>
    <tr>
      <th nzAlign="center" nzWidth="100px">序号</th>
      <th nzAlign="center">类型</th>
      <th nzAlign="center">平台</th>
      <th nzAlign="center">会员</th>
      <th nzAlign="center">套餐</th>
      <th nzAlign="center" nzWidth="160px">官方价格</th>
      <th nzAlign="center" nzWidth="160px">平台价格</th>
      <th nzAlign="center" nzWidth="160px">{{detail?.promotionInfo?.type === 1 ? '满减' : '满折'}}</th>
      <th nzAlign="center" nzWidth="160px">最终价格</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of table.data;let index=index">
      <td nzAlign="center">{{index + 1}}</td>
      <td nzAlign="center">{{ data.typeName }}</td>
      <td nzAlign="center">{{ data.brandName }}</td>
      <td nzAlign="center">{{ data.name }}</td>
      <td nzAlign="center">{{ data.spec }}</td>
      <td nzAlign="center">{{ data.originalPrice }}</td>
      <td nzAlign="center">
        <div *ngIf="data.priceB">B端：{{ data.priceB }}</div>
        <div *ngIf="data.price">C端：{{ data.price }}</div>
      </td>
      <td nzAlign="center">{{data.discount}}</td>
      <td nzAlign="center">
        <div *ngIf="data.finalPriceB">B端：{{ data.finalPriceB }}</div>
        <div *ngIf="data.finalPrice">C端：{{ data.finalPrice }}</div>
      </td>
    </tr>
    </tbody>
  </nz-table>

  <h1>使用信息</h1>
  <nz-row class="baseRow">
    <nz-col nzSpan="8">
      <span class="label">参与人数</span>
      <span class="info">{{detail?.peopleCount}}</span>
    </nz-col>
    <nz-col nzSpan="8">
      <span class="label" style="width: 98px">活动总成交金额</span>
      <span class="info">{{detail?.tprcSum}}</span>
    </nz-col>
    <nz-col nzSpan="8">
      <span class="label" style="width: 98px">活动优惠总金额</span>
      <span class="info">{{detail?.aprcSum}}</span>
    </nz-col>
  </nz-row>
  <nz-row class="baseRow">
    <nz-col nzSpan="8">
      <span class="label">购买商品数</span>
      <span class="info">{{detail?.goodsCount}}</span>
    </nz-col>
  </nz-row>
</nz-card>
